npm install tailwindcss
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
/* ./src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
npx tailwindcss-cli@latest init
// tailwind.config.js
module.exports = {
- purge: [],
+ purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}